Optimal. Leaf size=134 \[ \frac {4 \sin (c+d x)}{21 a^4 d}-\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3583, 3581,
2713} \begin {gather*} -\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {4 \sin (c+d x)}{21 a^4 d}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2713
Rule 3581
Rule 3583
Rubi steps
\begin {align*} \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{9 a}\\ &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {20 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{63 a^2}\\ &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {4 \int \cos ^3(c+d x) \, dx}{21 a^4}\\ &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {4 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{21 a^4 d}\\ &=\frac {4 \sin (c+d x)}{21 a^4 d}-\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.28, size = 95, normalized size = 0.71 \begin {gather*} -\frac {i \sec ^4(c+d x) (-168 \cos (c+d x)-180 \cos (3 (c+d x))+28 \cos (5 (c+d x))-42 i \sin (c+d x)-135 i \sin (3 (c+d x))+35 i \sin (5 (c+d x)))}{1008 a^4 d (-i+\tan (c+d x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 174, normalized size = 1.30
method | result | size |
risch | \(\frac {5 i {\mathrm e}^{-3 i \left (d x +c \right )}}{48 a^{4} d}+\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{16 a^{4} d}+\frac {5 i {\mathrm e}^{-7 i \left (d x +c \right )}}{224 a^{4} d}+\frac {i {\mathrm e}^{-9 i \left (d x +c \right )}}{288 a^{4} d}+\frac {i \cos \left (d x +c \right )}{8 a^{4} d}+\frac {3 \sin \left (d x +c \right )}{16 a^{4} d}\) | \(103\) |
derivativedivides | \(\frac {\frac {2}{32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 i}+\frac {86 i}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {8 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}-\frac {49 i}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {49 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {16}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {132}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {31}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {173}{12 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {31}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{4} d}\) | \(174\) |
default | \(\frac {\frac {2}{32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 i}+\frac {86 i}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {8 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}-\frac {49 i}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {49 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {16}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {132}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {31}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {173}{12 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {31}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{4} d}\) | \(174\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 74, normalized size = 0.55 \begin {gather*} \frac {{\left (-63 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 315 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 126 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 45 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{2016 \, a^{4} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.35, size = 231, normalized size = 1.72 \begin {gather*} \begin {cases} \frac {\left (- 1585446912 i a^{20} d^{5} e^{26 i c} e^{i d x} + 7927234560 i a^{20} d^{5} e^{24 i c} e^{- i d x} + 5284823040 i a^{20} d^{5} e^{22 i c} e^{- 3 i d x} + 3170893824 i a^{20} d^{5} e^{20 i c} e^{- 5 i d x} + 1132462080 i a^{20} d^{5} e^{18 i c} e^{- 7 i d x} + 176160768 i a^{20} d^{5} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{50734301184 a^{24} d^{6}} & \text {for}\: a^{24} d^{6} e^{25 i c} \neq 0 \\\frac {x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 9 i c}}{32 a^{4}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.82, size = 145, normalized size = 1.08 \begin {gather*} \frac {\frac {63}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}} + \frac {1953 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 9450 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 25998 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 42210 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 46368 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 33054 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15858 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4374 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 703}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{9}}}{1008 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.41, size = 161, normalized size = 1.20 \begin {gather*} \frac {\left (63\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,252{}\mathrm {i}-588\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,672{}\mathrm {i}+378\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,168{}\mathrm {i}+372\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,288{}\mathrm {i}-97\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+20{}\mathrm {i}\right )\,2{}\mathrm {i}}{63\,a^4\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________